<table class="form">
    <tr>
        <td class="label required">Category</td>
        <td>
            <select class="w200" name="image_category_id" id="image_category_id">
                <option value="">Category</option>
                <?php foreach($list_category as $category){
                    echo '<option '.(($category->image_category_id==$item->image_category_id)?'selected':'').' value="'.$category->image_category_id.'">'.$category->image_category_name.'</option>';
                }?>
            </select>
        </td>
    </tr>
    <tr>
        <td class="label">Title</td>
        <td>
            <input class="w300" type="text" name="lb_title" id="lb_title" value="<?=$item->lb_title?>"/>
        </td>
    </tr>
    <tr>
        <td class="label"></td>
        <td class="footer">
            <input id="btn_save"  type="button" name="bt_submit" class="capnhat">
        </td>
    </tr>
</table>

<script>
    $("#btn_save").click(function(){
        $.ajax({
			type:"POST",
			url:"<?=base_url()?>mod_file_manager/image_manager/save_image",
			data:{
                image_data_id: '<?=$item->image_data_id?>',
                image_category_id:$("#image_category_id").val(),
                lb_title:$("#lb_title").val()
            },
			async:true,
            dataType:'json',
			success: function(data){
				if(data.success == true ){
                    parent.$.fn.colorbox.close();
                }
			}
		});
    });
</script>